<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Sektor Details</f:facet>

        <s:decorate id="id" template="layout/display.xhtml">
            <ui:define name="label">Id</ui:define>
            <h:outputText value="#{sektorHome.instance.id}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="sektorAdi" template="layout/display.xhtml">
            <ui:define name="label">Sektor adi</ui:define>
            <h:outputText value="#{sektorHome.instance.sektorAdi}"/>
        </s:decorate>

        <s:decorate id="sektorKodu" template="layout/display.xhtml">
            <ui:define name="label">Sektor kodu</ui:define>
            <h:outputText value="#{sektorHome.instance.sektorKodu}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/SektorEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty sektorFrom ? 'SektorList' : sektorFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Bolums</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="bolumsChildren">

        <h:outputText value="There are no bolums associated with this sektor."
                   rendered="#{empty sektorHome.bolums}"/>

        <rich:dataTable value="#{sektorHome.bolums}"
                       var="_bolum"
                  rendered="#{not empty sektorHome.bolums}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="bolumsTable">
            <rich:column sortBy="#{_bolum.id}">
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_bolum.id}">
                    <f:convertNumber/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_bolum.bolumAdi}">
                <f:facet name="header">Bolum adi</f:facet>
                <h:outputText value="#{_bolum.bolumAdi}"/>
            </rich:column>
            <rich:column sortBy="#{_bolum.bolumKodu}">
                <f:facet name="header">Bolum kodu</f:facet>
                <h:outputText value="#{_bolum.bolumKodu}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectbolum"
                     value="Select"
                      view="/Bolum.xhtml">
                    <f:param name="bolumId"
                            value="#{_bolum.id}"/>
                    <f:param name="bolumFrom" value="Sektor"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add bolum"
                view="/BolumEdit.xhtml">
            <f:param name="sektorId"
                    value="#{sektorHome.instance.id}"/>
            <f:param name="bolumFrom" value="Sektor"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Kullanici is tecrubeleris</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="kullaniciIsTecrubelerisChildren">

        <h:outputText value="There are no kullaniciIsTecrubeleris associated with this sektor."
                   rendered="#{empty sektorHome.kullaniciIsTecrubeleris}"/>

        <rich:dataTable value="#{sektorHome.kullaniciIsTecrubeleris}"
                       var="_kullaniciIsTecrubeleri"
                  rendered="#{not empty sektorHome.kullaniciIsTecrubeleris}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="kullaniciIsTecrubelerisTable">
            <rich:column sortBy="#{_kullaniciIsTecrubeleri.id}">
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_kullaniciIsTecrubeleri.id}">
                    <f:convertNumber/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_kullaniciIsTecrubeleri.firmaAdi}">
                <f:facet name="header">Firma adi</f:facet>
                <h:outputText value="#{_kullaniciIsTecrubeleri.firmaAdi}"/>
            </rich:column>
            <rich:column sortBy="#{_kullaniciIsTecrubeleri.iseBaslamaTarihi}">
                <f:facet name="header">Ise baslama tarihi</f:facet>
                <h:outputText value="#{_kullaniciIsTecrubeleri.iseBaslamaTarihi}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_kullaniciIsTecrubeleri.istenAyrilmaTarihi}">
                <f:facet name="header">Isten ayrilma tarihi</f:facet>
                <h:outputText value="#{_kullaniciIsTecrubeleri.istenAyrilmaTarihi}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectkullaniciIsTecrubeleri"
                     value="Select"
                      view="/KullaniciIsTecrubeleri.xhtml">
                    <f:param name="kullaniciIsTecrubeleriId"
                            value="#{_kullaniciIsTecrubeleri.id}"/>
                    <f:param name="kullaniciIsTecrubeleriFrom" value="Sektor"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add kullaniciIsTecrubeleri"
                view="/KullaniciIsTecrubeleriEdit.xhtml">
            <f:param name="sektorId"
                    value="#{sektorHome.instance.id}"/>
            <f:param name="kullaniciIsTecrubeleriFrom" value="Sektor"/>
        </s:button>
    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
